package com.structure;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: springbootRabbitmq->CollectionsTest
 * @description: collections 测试
 * @author: G_Y
 * @create: 2019-08-13 18:17
 **/
public class CollectionsTest {

    public static void main(String[] args) {
        HashMap<Integer, String> map = new HashMap<>();
        Map<Integer, String> synchronizedMap = Collections.synchronizedMap(map);
        synchronizedMap.put(1,"str1");
    }
}
